const express = require('express');

const router = express.Router();

router.get( '/random' , (req,resp) => {

    let locals = { 
        rand: Math.random() ,
        array: [ ['王燕','女','18'] , ['王永年','男','18'] , ['付彪','男','16'] ] ,
        student: {
            id: 2002 , 
            name: '马丽娜' ,
            gender: '女' ,
            nickname: '阿麦' 
        }
    }

    resp.render( 'student/random' , locals , (err,html)=>{
        if( !err ){
            resp.send( html );
        }
    });

});

module.exports = router ;